package com.chb.interpreter;

/**
 * @author chihb
 * @create-time 2024/10/24 20:59
 * @description
 */
public class Variable extends AbstractExpression{
    private String name;

    public Variable(String name)
    {
        this.name = name;
    }


    @Override
    public int interpret(Context context) {
        return context.getValue(this);
    }

    @Override
    public String toString() {
        return name;
    }
}
